import {GameFrameworkEventArgs} from "../Base/GameFrameworkEventArgs";
import {PlaySoundParams} from "./PlaySoundParams";
import {ReferencePool} from "../Base/ReferencePool/ReferencePool";

export class PlaySoundDependencyAssetEventArgs extends GameFrameworkEventArgs{

    public static Create(serialId:number,soundAssetName:string,soundGroupName:string,playSoundParams:PlaySoundParams,
                         dependencyAssetName:string,loadedCount:number,totalCount:number,userData){
        let playSoundDependencyAssetEventArgs:PlaySoundDependencyAssetEventArgs = ReferencePool.Acquire(PlaySoundDependencyAssetEventArgs);
        playSoundDependencyAssetEventArgs._serialId = serialId;
        playSoundDependencyAssetEventArgs._soundAssetName = soundAssetName;
        playSoundDependencyAssetEventArgs._soundGroupName = soundGroupName;
        playSoundDependencyAssetEventArgs._playSoundParams = playSoundParams;
        playSoundDependencyAssetEventArgs._dependencyAssetName = dependencyAssetName;
        playSoundDependencyAssetEventArgs._loadedCount = loadedCount;
        playSoundDependencyAssetEventArgs._totalCount = totalCount;
        playSoundDependencyAssetEventArgs._userData = userData;
        return playSoundDependencyAssetEventArgs;
    }


    get serialId(): number {
        return this._serialId;
    }

    get soundAssetName(): string {
        return this._soundAssetName;
    }

    get soundGroupName(): string {
        return this._soundGroupName;
    }

    get playSoundParams(): PlaySoundParams {
        return this._playSoundParams;
    }

    get dependencyAssetName(): string {
        return this._dependencyAssetName;
    }

    get loadedCount(): number {
        return this._loadedCount;
    }

    get totalCount(): number {
        return this._totalCount;
    }

    get userData() {
        return this._userData;
    }
    private _serialId:number;
    private _soundAssetName:string;
    private _soundGroupName:string;
    private _playSoundParams:PlaySoundParams;
    private _dependencyAssetName:string;
    private _loadedCount:number;
    private _totalCount:number;
    private _userData;




    constructor() {
        super();
        this._serialId = 0;
        this._soundAssetName = null;
        this._soundGroupName = null;
        this._dependencyAssetName = null;
        this._playSoundParams =null;
        this._loadedCount = 0;
        this._totalCount = 0;
        this._userData = null;
    }



    Clear(): void {
        this._serialId = 0;
        this._soundAssetName = null;
        this._soundGroupName = null;
        this._playSoundParams = null;
        this._dependencyAssetName = null;
        this._loadedCount = 0;
        this._totalCount = 0;
        this._userData = null;
    }

}